home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Information / CSMP Digest / volume 1 / csmp-v1-180.txt < prev    next >
Encoding:
Text File  |  1994-12-08  |  43.1 KB  |  1,150 lines  |  [TEXT/R*ch]

  1. C.S.M.P. Digest             Fri, 09 Oct 92       Volume 1 : Issue 180
  2.  
  3. Today's Topics:
  4.  
  5.     Storing Windows
  6.     THINK C 5.0 Code overflow
  7.     GCC under MPW Shell.
  8.     Altering the TRAP dispatch table.
  9.     how to put indelible serial# in resource fork of app?
  10.  
  11.  
  12.  
  13. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  14.  
  15. The digest is a collection of article threads from the internet newsgroup
  16. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  17. regularly and want an archive of the discussions.  If you don't know what a
  18. newsgroup is, you probably don't have access to it.  Ask your systems
  19. administrator(s) for details.  (This means you can't post questions to the
  20. digest.)
  21.  
  22. Each issue of the digest contains one or more sets of articles (called
  23. threads), with each set corresponding to a 'discussion' of a particular
  24. subject.  The articles are not edited; all articles included in this digest
  25. are in their original posted form (as received by our news server at
  26. cs.uoregon.edu).  Article threads are not added to the digest until the last
  27. article added to the thread is at least one month old (this is to ensure that
  28. the thread is dead before adding it to the digest).  Article threads that
  29. consist of only one message are generally not included in the digest.
  30.  
  31. The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
  32. [128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
  33. file /pub/mac/csmp-digest/README before downloading any files.  The most
  34. recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
  35. directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
  36. archive has a mail server; send a message with the text '$MACarch help' (no
  37. quotes) to LISTSERV@ricevm1.rice.edu for more information.
  38.  
  39. The digest is also available via email.  Just send a note saying that you
  40. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  41. automatically receive each new issue as it is created.  Sorry, back issues
  42. are not available through the mailing list.
  43.  
  44. Send administrative mail to mkelly@cs.uoregon.edu.
  45.  
  46.  
  47. -------------------------------------------------------
  48.  
  49. From: yjc@po.cwru.edu (Jerome Chan)
  50. Subject: Storing Windows
  51. Date: 26 Jul 92 17:21:46 GMT
  52. Organization: Alethea, The Twilight World!
  53.  
  54.  
  55.  Is there a way to store windows efficiently? If we use
  56.  
  57.   GetNewWindows(RESOURCE,NULL,WINDOW_LOCATION) ;
  58.  
  59. the window would be stored as non-relocateable. Is there anyway we can
  60. use handles to store the window data?
  61.  
  62. - ---
  63.  The Evil Tofu
  64.  
  65. "No Lah! Sure or not one? Dunno leh! Nebber Mind! Like that one!
  66. Terriblur Lah!"
  67.  
  68. +++++++++++++++++++++++++++
  69.  
  70. From: keith@taligent.com (Keith Rollin)
  71. Date: 26 Jul 92 21:59:08 GMT
  72. Organization: Taligent
  73.  
  74. In article <1992Jul26.172146.21715@usenet.ins.cwru.edu>, Jerome Chan
  75. <yjc@po.cwru.edu> writes:
  76. >  Is there a way to store windows efficiently? If we use
  77. >   GetNewWindows(RESOURCE,NULL,WINDOW_LOCATION) ;
  78. > the window would be stored as non-relocateable. Is there anyway we can
  79. > use handles to store the window data?
  80.  
  81. No. WindowRecords contain an embedded GrafPort. According to Technote #155,
  82. GrafPorts should not be allocated in relocatable buffers.
  83.  
  84. - --
  85. Keith Rollin
  86. Phantom Programmer
  87. Taligent, Inc.
  88.  
  89. ---------------------------
  90.  
  91. From: christ@cs.few.eur.nl (Christ Leijtens)
  92. Subject: THINK C 5.0 Code overflow
  93. Date: 27 Jul 92 16:08:00 GMT
  94. Organization: Erasmus Universiteit Rotterdam
  95.  
  96.  
  97.  
  98.                               THINK C 5.0                    7-27-92
  99.  
  100.  
  101.  
  102.    Dear Netters,
  103.  
  104.          As beginners at programming the Macintosh Quadra system  we
  105.    have  a  question about THINK C 5.0. We are porting a system pro-
  106.    grammed in the language C under the  operating  system  UNIX.  We
  107.    have  to port the program into THINK C 5.0 on the Macintosh (Qua-
  108.    dra 900 using System 7).
  109.  
  110.          The system we are porting is quit big.  When  compiling  we
  111.    get the error message:
  112.    Code overflow
  113.  
  114.    After reading the THINK C 5.0 User Manual we found out it had  to
  115.    do  with the maximum code-length of one C source-file. The manual
  116.    says:
  117.  
  118.    You have more than 32K of code or data in one  file.  Break  your
  119.    file up into smaller files.
  120.  
  121.    We tried to split the files giving the code overflow  errors.  It
  122.    seemed,  not  the  sources  where the real trouble, but the (big)
  123.    header files. We did not succeed at splitting the  files  to  get
  124.    rid of the errors.
  125.  
  126.          Question: Is there *any* way to get around this  bound  for
  127.    the  code and data, so we can continue porting the program to the
  128.    Macintosh? We would like any information on porting programs from
  129.    other implementation of the C-language to Macintosh THINK C 5.0.
  130.  
  131.          Thanks in advance. Greetings,
  132.  
  133.  
  134.  
  135.                                          Young Ryu & Christ Leijtens
  136.  
  137. - -- 
  138.     e-mail:    christ@cs.few.eur.nl          _(.~\  ____
  139.            christ@sus.eur.nl         /_|  /_/\/\/\__ 
  140.                                                 > _/\/\/\/\/
  141.                            /_/ \/\/\/\_\
  142. - -- 
  143.     e-mail:    christ@cs.few.eur.nl          _(.~\  ____
  144.            christ@sus.eur.nl         /_|  /_/\/\/\__ 
  145.                                                 > _/\/\/\/\/
  146.                            /_/ \/\/\/\_\
  147.  
  148. +++++++++++++++++++++++++++
  149.  
  150. From: niko@iastate.edu (Nikolaus E Schuessler)
  151. Organization: Iowa State University, Ames, IA
  152. Date: Mon, 27 Jul 1992 17:22:49 GMT
  153.  
  154. In article <1992Jul27.160800.18222@cs.few.eur.nl> christ@cs.few.eur.nl (Christ Leijtens) writes:
  155.  
  156. >         Question: Is there *any* way to get around this  bound  for
  157. >   the  code and data, so we can continue porting the program to the
  158. >   Macintosh? We would like any information on porting programs from
  159. >   other implementation of the C-language to Macintosh THINK C 5.0.
  160. >
  161.  
  162. Yes, there is... You have to declare all arrays as pointers to arrays
  163. and malloc them in a routine at the start of your program... A * real *
  164. pain ...
  165.  
  166. char x[1000];
  167.  
  168. to char *x;
  169.  
  170. ...
  171.  
  172. x = (char *) malloc(1000 * sizeof(char))
  173.  
  174. >-- 
  175. >    e-mail:    christ@cs.few.eur.nl          _(.~\  ____
  176. >           christ@sus.eur.nl         /_|  /_/\/\/\__ 
  177. >                                                > _/\/\/\/\/
  178.  
  179.  
  180. Like your turtle ...
  181.  
  182. - -- 
  183. Niko Schuessler               
  184. Project Vincent Systems Manager              email: niko@iastate.edu
  185. Iowa State University Computation Center     voice: (515) 294-1672
  186. Ames IA 50010                                snail: 272 Durham 
  187.  
  188. +++++++++++++++++++++++++++
  189.  
  190. From: joshr@kronos.arc.nasa.gov (Joshua Rabinowitz-Summer-91)
  191. Organization: NASA/ARC Information Sciences Division
  192. Date: Mon, 27 Jul 1992 18:28:27 GMT
  193.  
  194. In article <1992Jul27.172249.17584@news.iastate.edu> niko@iastate.edu (Nikolaus E Schuessler) writes:
  195. >In article <1992Jul27.160800.18222@cs.few.eur.nl> christ@cs.few.eur.nl (Christ Leijtens) writes:
  196. >
  197. >>         Question: Is there *any* way to get around this  bound  for
  198. >>   the  code and data, so we can continue porting the program to the
  199. >>   Macintosh? We would like any information on porting programs from
  200. >>   other implementation of the C-language to Macintosh THINK C 5.0.
  201. >>
  202. >
  203. >Yes, there is... You have to declare all arrays as pointers to arrays
  204. >and malloc them in a routine at the start of your program... A * real *
  205. >pain ...
  206. >
  207. >char x[1000];
  208. >
  209. >to char *x;
  210. >
  211. >...
  212. >
  213. >x = (char *) malloc(1000 * sizeof(char))
  214.  
  215.  
  216. Ummm, are you sure this is what you mean?  it gets an array of 1000 chars
  217. from local memory, then again from malloc.  In addition, isn't x, as declared,
  218. a constant pointer (my language may be incorrect, but i STRONGLY suspect
  219.                the above code of being not what you meant).
  220.  
  221. What I think you menat was
  222.  
  223. {
  224.  ...
  225.  char *x;
  226.  x = (char *) malloc(1000 * sizeof(char));
  227.  
  228. }
  229.  
  230. right?
  231. >
  232.  
  233.  
  234. - -- 
  235. - ----------------------------------
  236. #include <std/disclaimer.h>     Josh Rabinowitz, Mac TCL programmer
  237. joshr@kronos.arc.nasa.gov
  238. "'I see', said the blind carpenter, as he picked up his hammer and saw".
  239.  
  240. +++++++++++++++++++++++++++
  241.  
  242. From: niko@iastate.edu (Nikolaus E Schuessler)
  243. Date: 27 Jul 92 19:31:50 GMT
  244. Organization: Iowa State University, Ames, IA
  245.  
  246.  
  247. >
  248. >What I think you menat was
  249.  
  250. sed s/menat/meant/ :-)
  251.  
  252. >
  253. >{
  254. > ...
  255. > char *x;
  256. > x = (char *) malloc(1000 * sizeof(char));
  257. >
  258. >}
  259.  
  260. Yeah.. I though I put 'You should change a declaration like...' in front of the
  261. char x[1000];
  262.  
  263. sorry...
  264.  
  265.  
  266.  
  267. - -- 
  268. Niko Schuessler               
  269. Project Vincent Systems Manager              email: niko@iastate.edu
  270. Iowa State University Computation Center     voice: (515) 294-1672
  271. Ames IA 50010                                snail: 272 Durham 
  272.  
  273. +++++++++++++++++++++++++++
  274.  
  275. From: hp48sx@wupost.wustl.edu (HP48SX Archive Maintainer)
  276. Date: 28 Jul 92 11:26:22 GMT
  277. Organization: Washington University in Saint Louis, MO USA
  278.  
  279. niko@iastate.edu (Nikolaus E Schuessler) writes:
  280.  
  281. >In article <1992Jul27.160800.18222@cs.few.eur.nl> christ@cs.few.eur.nl (Christ Leijtens) writes:
  282.  
  283. >>         Question: Is there *any* way to get around this  bound  for
  284. >>   the  code and data, so we can continue porting the program to the
  285. >>   Macintosh? We would like any information on porting programs from
  286. >>   other implementation of the C-language to Macintosh THINK C 5.0.
  287. >>
  288.  
  289. >Yes, there is... You have to declare all arrays as pointers to arrays
  290. >and malloc them in a routine at the start of your program... A * real *
  291. >pain ...
  292.  
  293. OR
  294.  
  295. You can go get MPW C which handles large code and data spaces without
  296. the same limitations as THINK C. You get a slower compiler though, but
  297. lots of other good stuff.
  298. - -- 
  299. Povl H. Pedersen             hp48sx@wuarchive.wustl.edu
  300. HP48sx archive maintainer
  301.  
  302. All Opinions (C) Copyright the Integalactic Thought Association
  303.  
  304. +++++++++++++++++++++++++++
  305.  
  306. From: pmcilroy@srd.bt.co.uk (Paul McIlroy)
  307. Date: 28 Jul 92 10:23:50 GMT
  308. Organization: British Telecom
  309.  
  310. Christ Leijtens (christ@cs.few.eur.nl) writes 
  311. >  Is there *any* way to get around the 32K bound for
  312. >  the  code and data, so we can continue porting the 
  313. >  program to the Macintosh?
  314.  
  315. If no individual array or structure is bigger than 32K 
  316. compile all the declarations separately.  I know this sounds 
  317. daft, but it works.
  318.  
  319. e.g. if you have
  320.  
  321. 10_byte_struct_type a[3000];
  322. 12_byte_struct_type b[2000];
  323. 16_byte_struct_type c[1500];
  324.  
  325. then together these will cause a code overflow, but 
  326. individually they are OK.
  327.  
  328. So, split the three declarations into three .c files and 
  329. compile them separately (with the far data box checked in 
  330. the Set Project Type dialog). Then in the main program 
  331. declare a, b and c as external arrays.  I have done
  332. this myself and it works well.
  333.  
  334. If all else fails you can use malloc as others have 
  335. suggested, using static pointers instead of static arrays, 
  336. but be careful with linking.  If you have
  337.     extern 10_byte_struct_type a[3000];
  338. in one file it will not link to
  339.     10_byte_struct_type *a;
  340. in another.  You will need to change ALL your array 
  341. declarations to pointers, in all your files, which is really 
  342. tedious.
  343.  
  344. Paul McIlroy (pmcilroy@bt-sys.bt.co.uk)
  345.  
  346. ---------------------------
  347.  
  348. From: glalonde@VNET.IBM.COM ("Glen Lalonde")
  349. Subject: GCC under MPW Shell.
  350. Date: 27 Jul 92 17:59:29 GMT
  351.  
  352. The MPW shell will work on an SE, if you have a 68030 accelerator card.
  353. (it makes no color QD calls :-)
  354.  
  355. I recall reading on the newsgroup that the GCC port to MPW requires the
  356. MPW assembler. Is this correct? Can I possibly get around this some how?
  357. I guess GAS was not ported.
  358.  
  359. Also, are there any text instructions(help files) for the MPW Shell on
  360. a ftp site some place?
  361.  
  362.  
  363.  
  364.  
  365. +++++++++++++++++++++++++++
  366.  
  367. From: mlanett@Apple.COM (Mark Lanett)
  368. Date: 28 Jul 92 07:06:37 GMT
  369. Organization: Apple Computer Inc., Cupertino, CA
  370.  
  371. glalonde@VNET.IBM.COM ("Glen Lalonde") writes:
  372.  
  373. >I recall reading on the newsgroup that the GCC port to MPW requires the
  374. >MPW assembler. Is this correct? Can I possibly get around this some how?
  375. >I guess GAS was not ported.
  376.  
  377. Yes, Asm is required. GCC is like many unix compilers in that it only converts
  378. to assembly and lets the system's assembler handle the rest. It makes
  379. porting easier.
  380.  
  381. Not only is Asm required, so are the MPW C 3.1 (not 3.2) headers and libraries,
  382. for which you'll need to look on an older dev. cd. MPW C is also required
  383. to compile it (if you modify the sources; I don't remember if the distribution
  384. includes a binary).
  385.  
  386. GCC 2.2 is under way, and someday in the (distant) future GAS may be available
  387. also. But don't hold your breath. I'll let the people actually involved say
  388. more.
  389. - -- 
  390. Have a bajillion brilliant Jobsian lithium licks.
  391. Mark Lanett, NOT speaking for anyone. Personal opinion only.
  392.  
  393. ---------------------------
  394.  
  395. From: glalonde@VNET.IBM.COM ("Glen Lalonde")
  396. Subject: Altering the TRAP dispatch table.
  397. Date: 27 Jul 92 19:11:30 GMT
  398.  
  399. I need to change the location that one of the OS Traps goes go.
  400. IM detains how to do this, but under sys 7 the effect seems to be local
  401. to that process. Once the application that did the patch exits, the OS Trap
  402. went back to its old value. Is there any way to make the patch GLOBAL and
  403. PERSISTENT?
  404.  
  405. For now I just figured out the location in memory and patched it via
  406. C. I doubt if the trap table always starts at location $400 in memory
  407. for all models though.
  408.  
  409. I want to trap BlockMove to a version optimized for the 030, my SE has
  410. a 030 card.
  411.  
  412. +++++++++++++++++++++++++++
  413.  
  414. From: ewylie@ocf.berkeley.edu (Elizabeth Wylie)
  415. Date: 28 Jul 92 19:52:18 GMT
  416. Organization: U.C. Berkeley Open Computing Facility
  417.  
  418. In article <9207271916.AA19926@ucbvax.Berkeley.EDU> glalonde@VNET.IBM.COM ("Glen Lalonde") writes:
  419. >I need to change the location that one of the OS Traps goes go.
  420. >IM detains how to do this, but under sys 7 the effect seems to be local
  421. >to that process. Once the application that did the patch exits, the OS Trap
  422. >went back to its old value. Is there any way to make the patch GLOBAL and
  423. >PERSISTENT?
  424. >
  425. >For now I just figured out the location in memory and patched it via
  426. >C. I doubt if the trap table always starts at location $400 in memory
  427. >for all models though.
  428.  
  429.  ^^^^ I really do hope that's temporary! ^^^^
  430.  
  431. >I want to trap BlockMove to a version optimized for the 030, my SE has
  432. >a 030 card.
  433.  
  434. In order for your patch to be active as long as the computer is turned on,
  435. you'll need to write an INIT (er, extension...).  (Is that kinda like
  436. 'wetlands' and 'marshes' ?)
  437.  
  438. Anyway, you're lucky.  Your patch doesn't need to call the system when it's
  439. done.  You just want to totally yank out the existing one.  At startup,
  440. use SetTrapAddress to point to your routine.  This routine should be loaded
  441. as a locked-system heap code resource.  (Not 'CODE', code.)
  442.  
  443. Be sure to detach the rtesource so you're initextention won't be purged when
  444. the file is closed.  Also remember that BlockMove is register based.
  445.  
  446. Finally, good luck on beating apple's code.  They write _very tight_ assembly
  447. where it counts.  (Elsewhere they tend to do some rather wierd C++).
  448.  
  449. - -E. Wylie
  450.  
  451. +++++++++++++++++++++++++++
  452.  
  453. From: d88-jwa@dront.nada.kth.se (Jon W{tte)
  454. Date: 28 Jul 92 21:41:52 GMT
  455. Organization: Royal Institute of Technology, Stockholm, Sweden
  456.  
  457. @ocf.berkeley.edu (Elizabeth Wylie) writes:
  458.  
  459.    >I want to trap BlockMove to a version optimized for the 030, my SE has
  460.    >a 030 card.
  461.  
  462.    Finally, good luck on beating apple's code.  They write _very tight_ assembly
  463.    where it counts.  (Elsewhere they tend to do some rather wierd C++).
  464.  
  465.  
  466. The ROMs in the SE are _not_ optimized for the 68030...
  467.  
  468. - -- 
  469.       Jon W{tte, Svartmangatan 18, S-111 29 Stockholm, Sweden
  470.                   h+@nada.kth.se    +46-10-141652
  471.  
  472.               My cat usually runs around on the roof.
  473.  
  474. ---------------------------
  475.  
  476. From: rgonzal@gandalf.rutgers.edu (Ralph Gonzalez)
  477. Subject: how to put indelible serial# in resource fork of app?
  478. Date: 20 Jul 92 21:18:21 GMT
  479. Organization: Rutgers Univ., New Brunswick, N.J.
  480.  
  481.  
  482. Hi.  I am finishing an application for a client, who would like me to
  483. put a serial number on each copy of the completed application.  This
  484. is no doubt naive of me, but I was planning on using ResEdit to put a
  485. unique serial # in each copy of the app (what a pain!) using a STR
  486. resource.  Unfortunately, any purchaser can easily change this serial
  487. number him/herself using ResEdit.
  488.  
  489. Is there an easy way to prevent changes to the STR resource, or is
  490. there a better way of doing this?
  491.  
  492. Thanks a lot for any help,
  493. Ralph
  494. rgonzal@elbereth.rutgers.edu
  495. - -- 
  496. Ralph Gonzalez, Computer Science, Rutgers Univ., Camden, NJ
  497. Phone: (609) 757-6122; Internet: rgonzal@elbereth.rutgers.edu
  498. - --
  499.  
  500. +++++++++++++++++++++++++++
  501.  
  502. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  503. Organization: Kalamazoo College
  504. Date: Mon, 20 Jul 1992 23:27:38 GMT
  505.  
  506. rgonzal@gandalf.rutgers.edu (Ralph Gonzalez) writes:
  507. >
  508. >Hi.  I am finishing an application for a client, who would like me to
  509. >put a serial number on each copy of the completed application.  This
  510. >is no doubt naive of me, but I was planning on using ResEdit to put a
  511. >unique serial # in each copy of the app (what a pain!) using a STR
  512. >resource.  Unfortunately, any purchaser can easily change this serial
  513. >number him/herself using ResEdit.
  514.  
  515. Write a quickie program that lets you select an application with the
  516. standard file box, then have it make n copies, adding a serial number to
  517. each one.  Since it's a quickie, you can hard-code both n and the serial
  518. number to start at, and no one will know the difference but you.  :-)
  519.  
  520. It's pretty easy to make it "unchangeable."  Make a routine that converts
  521. a 32-bit number into a moderately long (say, a 32-byte) code.  Make it
  522. so ridiculously weird and complicated that no one will ever be able to
  523. figure out what in the heck you're doing.  Then have the app check to be
  524. sure its code can be derived from a real 32-bit number;  if so, that's
  525. the serial number;  if not, put up a nasty message and exit.
  526. - -- 
  527.  Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
  528.  I suppose ya don't think I was run over by a streetcar!
  529.  
  530. +++++++++++++++++++++++++++
  531.  
  532. From: rgonzal@gandalf.rutgers.edu (Ralph Gonzalez)
  533. Date: 22 Jul 92 18:59:09 GMT
  534. Organization: Rutgers Univ., New Brunswick, N.J.
  535.  
  536. k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
  537.  
  538. >Write a quickie program that lets you select an application with the
  539. >standard file box, then have it make n copies, adding a serial number to
  540. >each one.  Since it's a quickie, you can hard-code both n and the serial
  541. >number to start at, and no one will know the difference but you.  :-)
  542.  
  543. >It's pretty easy to make it "unchangeable."  Make a routine that converts
  544. >a 32-bit number into a moderately long (say, a 32-byte) code.  Make it
  545. >so ridiculously weird and complicated that no one will ever be able to
  546. >figure out what in the heck you're doing.  Then have the app check to be
  547. >sure its code can be derived from a real 32-bit number;  if so, that's
  548. >the serial number;  if not, put up a nasty message and exit.
  549.  
  550. Thanks, and thanks to the others who responded via email.  The consensus
  551. was that I should write a program which sticks serial#'s into the
  552. resource fork (or the data fork!) of the applications.  The serial#'s
  553. should be encrypted and a checksum should be embedded in the resource
  554. as well.  Preferably this info should be in a non-obvious place,
  555. such as a CODE resource.  Several interesting alternative schemes
  556. were suggested as well.
  557.  
  558. Also, it appears to be a good idea to have the user enter their name
  559. the first time they run the program, and display it in the startup
  560. screen after that.  This helps "shame" non-registered users.
  561.  
  562. QUESTION 1:  Is it ok to store this name in the application's own
  563. resource fork?  I know this is normally discouraged since the app
  564. may be on a read-only fileserver, but for product registration you
  565. don't want to just store it in the Preferences file where everyone
  566. accessing the fileserver gets to register their own name...
  567.  
  568. QUESTION 2:  It occurs to me that if someone is going to get hold of
  569. someone else's serial#, then they will probably steal this person's
  570. copy of the software as well.  Therefore it doesn't help that each
  571. copy of the software has its own serial# encoded into it.  Rather, it
  572. should be sufficient to have the application request a serial #, and
  573. run it through a scheme (such as that suggested by Jamie McCarthy,
  574. above) which checks if it is a valid serial# -- RATHER THAN CHECKING
  575. IF IT IS THE "CORRECT" ONE.  For example, ask for a 10-digit number
  576. of which only 1000 combinations are valid (assuming you won't sell
  577. more than 1000 copies!).  This saves you from having to attach a
  578. unique serial # to each copy, and bundle it with a manual containing
  579. the correct serial # -- a hassle if someone else is doing the
  580. duplication for you.  Is this a common approach?
  581.  
  582. - -Ralph
  583.  
  584. - -- 
  585. Ralph Gonzalez, Computer Science, Rutgers Univ., Camden, NJ
  586. Phone: (609) 757-6122; Internet: rgonzal@elbereth.rutgers.edu
  587. - --
  588.  
  589. +++++++++++++++++++++++++++
  590.  
  591. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  592. Organization: Kalamazoo College
  593. Date: Wed, 22 Jul 1992 20:20:36 GMT
  594.  
  595. rgonzal@gandalf.rutgers.edu (Ralph Gonzalez) writes:
  596. >
  597. >Also, it appears to be a good idea to have the user enter their name
  598. >the first time they run the program, and display it in the startup
  599. >screen after that.  This helps "shame" non-registered users.
  600. >
  601. >QUESTION 1:  Is it ok to store this name in the application's own
  602. >resource fork?
  603.  
  604. Try the data fork.  When your app starts, check the data fork to see if
  605. name/company info is there.  If not, try opening your data fork with
  606. fsRdWrPerm.  If you can, request the name/company from the user and
  607. write it in.  If you get a wPrErr or an accessDenied error, you may be
  608. on a CD-ROM, a locked floppy, or a server with read-only access;
  609. no sweat, don't do anything.  If you get an fLckdErr, the file
  610. is locked--tell the user to unlock the app for registration purposes and
  611. ExitToShell.  That way, users can't defeat annoying registration notices
  612. by just locking your app.  If they want to run off a locked floppy or a
  613. read-only folder on a server, then they're obviously quite dedicated to
  614. not seeing that annoying registration, and you won't stop them anyway.
  615. :-)
  616.  
  617. Don't sweat this too much.  If people want to steal your program, they
  618. will, and there's nothing you can do about it.  Don't spend too much
  619. time worrying about it, and don't annoy legitimate users with whatever
  620. scheme you do implement.
  621.  
  622. By the way, a good scheme mentioned in AppleDirect once is:  make a menu
  623. item that creates a demo copy of your app.  Then when someone asks a
  624. customer for a copy, s/he can say "sure" and quickly make a sample.
  625. - -- 
  626.  Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
  627.  He let the contents of the bottle do the thinking
  628.  Can't shake the devil's hand and say you're only kidding            - TMBG
  629.  
  630. +++++++++++++++++++++++++++
  631.  
  632. From: ewylie@ocf.berkeley.edu (Elizabeth Wylie)
  633. Date: 22 Jul 92 20:43:38 GMT
  634. Organization: U. C. Berkeley Open Computing Facility
  635.  
  636. I have a cool piece of shareware on my hard disk which seems to handle this whole name/serial number thing quite well.
  637.  
  638. It works entirely on the humiliation-ware concept.  Nobody wants someone else's name emblazoned on their $10 piece of software.  How low can you get?
  639.  
  640. So anyway the program makes you send in for your super-secret registration code.  This code is a really wierded-out checksum/encryption of your name.
  641.  
  642. So, for every name, there is a different secret code.  The program won't let you have a mismatching code/serial number.  It'll just say "Unregistered User".
  643.  
  644. Now, you could incorporate the user's name AND the serial number.  Use a lot of XORs and tricky bit shifting to get a suitable ugly checksum and then convert it to a long (10 digits or so) decimal number.
  645.  
  646. Anyway, that's what FinderWindows seems to do.  An excellent program, by the way.  It adds a windows menu to the finder and other programs.  Lets me keep 20 or so windows open on my screen and not lose a single one.
  647.  
  648. (Thanks Damon!)
  649.  
  650. - -E Wylie
  651.  
  652. +++++++++++++++++++++++++++
  653.  
  654. From: peirce@outpost.SF-Bay.org (Michael Peirce)
  655. Date: 23 Jul 92 00:38:50 GMT
  656. Organization: Peirce Software
  657.  
  658.  
  659. In article <14kh9qINNds5@agate.berkeley.edu> (comp.sys.mac.programmer), ewylie@ocf.berkeley.edu (Elizabeth Wylie) writes:
  660. > I have a cool piece of shareware on my hard disk which seems to
  661. > handle this whole name/serial number thing quite well.
  662. > It works entirely on the humiliation-ware concept.  Nobody wants
  663. > someone else's name emblazoned on their $10 piece of software. 
  664. > How low can you get?
  665. > So anyway the program makes you send in for your super-secret
  666. > registration code.  This code is a really wierded-out
  667. > checksum/encryption of your name.
  668. > So, for every name, there is a different secret code.  The
  669. > program won't let you have a mismatching code/serial number. 
  670. > It'll just say "Unregistered User".
  671. > Now, you could incorporate the user's name AND the serial
  672. > number.  Use a lot of XORs and tricky bit shifting to get a
  673. > suitable ugly checksum and then convert it to a long (10 digits
  674. > or so) decimal number.
  675. > Anyway, that's what FinderWindows seems to do.  An excellent
  676. > program, by the way.  It adds a windows menu to the finder and
  677. > other programs.  Lets me keep 20 or so windows open on my
  678. > screen and not lose a single one.
  679.  
  680. My shareware program, AppSizer, does something very similar.  Since
  681. it's a INIT/Control Panel, I added one more twist.  In addition to
  682. simply flashing unregistered copy in its windows, it also puts up
  683. a message once a month that reminds them of this fact too.  This extra
  684. prompt will often remind them even after they get used to the unregistered
  685. user message in the windows.  And a number of my registed users mention
  686. that this is what reminded them to register.
  687.  
  688. - --  Michael Peirce      --   peirce@outpost.SF-Bay.org
  689. - --  Peirce Software     --   Suite 301, 719 Hibiscus Place
  690. - --                      --   San Jose, California USA 95117
  691. - --  Makers of...        --   voice: (408) 244-6554 fax: (408) 244-6882
  692. - --            SMOOTHIE  --   AppleLink: peirce & America Online: AFC Peirce
  693.  
  694. +++++++++++++++++++++++++++
  695.  
  696. From: peter@cujo.curtin.edu.au (Peter N Lewis)
  697. Date: 23 Jul 92 02:51:21 GMT
  698. Organization: NCRPDA, Curtin University
  699.  
  700. In article <1992Jul20.232738.21376@hobbes.kzoo.edu>,
  701. k044477@hobbes.kzoo.edu (Jamie R. McCarthy) wrote:
  702.  
  703. > It's pretty easy to make it "unchangeable."  Make a routine that converts
  704. > a 32-bit number into a moderately long (say, a 32-byte) code.  Make it
  705. > so ridiculously weird and complicated that no one will ever be able to
  706. > figure out what in the heck you're doing.  Then have the app check to be
  707. > sure its code can be derived from a real 32-bit number;  if so, that's
  708. > the serial number;  if not, put up a nasty message and exit.
  709.  
  710. Thats always a fun technique to break that one :-).  A quick atb trap break
  711. in macsbug for the GetNewDialog call, ten seconds later you have the branch
  712. code that checks the validity of the code number, reverse that branch so it
  713. only puts up the dialog if the code number is CORRECT, and thats it.  Then
  714. I delete the app, and sometimes I even mail the authors to thank them for
  715. the entertainment their program gave me :-)
  716.  
  717. Now, please people if you want to write serial number type stuff here are
  718. some do's and don'ts:
  719.  
  720. Do make it hard to crack - some of us enjoy a chalenge :-)
  721.  
  722. Don't make it a pain to install - some of us don't like a chalenge :-)
  723.  
  724. Don't make it a nightmare for network administrators who have to install
  725. dozens/hundreds of copies of your app - some of us hate a challenge! :-)
  726.  
  727. If they must register to get the serial name that matches their name,don't
  728. screw up the spelling of their name! - some of us like our names spelled
  729. the way they are suppose to be (anyone heard of a preventatation research
  730. centre?)
  731.  
  732. Don't make users enter something everytime the program runs - some of us
  733. want to use your program, not memorise code numbers
  734.  
  735. Don't forget that any form of copy protection will likely get mentioned in
  736. review of your programs, and this may adversly affect sales.
  737.  
  738. Don't waste network bandwidth on serial number checks - its not your
  739. network to be wasting the bandwidth on, you want to tie up a network, get
  740. your own.
  741.  
  742. Do be pleasant about it - some of us are not to pleased to see acusing
  743. dialogs everytime we launch an app we paid good money for.
  744.  
  745. For users: Don't pirate software, and pay for shareware - some of us want
  746. to eat.
  747.  
  748. ObProgramming: One way to make life difficult for crackers is to use the
  749. serial number to encryp a code resource - store the user's name, and the
  750. users serial number in the data fork, display it in the startup dialog, and
  751. use it to decrypt vital code resources.  Then, checksum the code and if its
  752. not right, put up an alert - that way, even if the branch is removed the
  753. program will just crash (serves those nasty crackers right :-).  Of course,
  754. the virus detectors will probably blow their tops if you go around hacking
  755. with Code Resources.  Aside from which people will quite probably want to
  756. run a single copy of the app off a locked file server...  And for heavens
  757. sake turn macsbug name generation off before you compile it!  I have seen
  758. several commercial apps with names turned on in their code checking code,
  759. pretty impressive guys :-)
  760.  
  761. Have fun all,
  762.    Peter.
  763.  
  764. _______________________________________________________________________
  765. Peter N Lewis, NCRPDA, Curtin University       peter@cujo.curtin.edu.au
  766. GPO Box U1987, Perth WA 6001, AUSTRALIA             FAX: +61 9 367 8141
  767.  
  768. +++++++++++++++++++++++++++
  769.  
  770. From: d88-jwa@dront.nada.kth.se (Jon W{tte)
  771. Organization: Royal Institute of Technology, Stockholm, Sweden
  772. Date: Thu, 23 Jul 1992 09:08:13 GMT
  773.  
  774. .50.3> peter@cujo.curtin.edu.au (Peter N Lewis) writes:
  775.  
  776.    ObProgramming: One way to make life difficult for crackers is to use the
  777.    serial number to encryp a code resource - store the user's name, and the
  778.    users serial number in the data fork, display it in the startup dialog, and
  779.    use it to decrypt vital code resources.  Then, checksum the code and if its
  780.    not right, put up an alert - that way, even if the branch is removed the
  781.    program will just crash (serves those nasty crackers right :-).  Of course,
  782.  
  783. Yes. However, BE SURE TO FLUSH THE CACHE after you've decrypted
  784. the CODE resource. something like
  785.     if ( TrapAvailable ( _HwPriv ) ) {
  786.  
  787.         FlushDataCache ( ) ;
  788.         FlushInstructionCache ( ) ;
  789.     }
  790.  
  791.    the virus detectors will probably blow their tops if you go around hacking
  792.    with Code Resources.  Aside from which people will quite probably want to
  793.    run a single copy of the app off a locked file server...  And for heavens
  794.  
  795. No ! the cool thing is, you do this as a patch to GetResource and
  796. LoadResource, so it's only changed when loaded into memory, not
  797. on disk. Or you could load, move high, and lock the CODE resource
  798. and never let go of it; still only affects memory, not disk.
  799.  
  800.    sake turn macsbug name generation off before you compile it!  I have seen
  801.    several commercial apps with names turned on in their code checking code,
  802.    pretty impressive guys :-)
  803.  
  804. I see MacsBug symbols as a user service ! More than once have I had
  805. spontaneous crashes, and only the debugger names helped me figure
  806. out what was going on. Not to mention a dedicated user can provide
  807. excellent feedback for Tech Support if the names still are in there,
  808. like, fixing their bugs :-)
  809.  
  810. - -- 
  811.          Jon W{tte, Svartmangatan 18, S-111 29 Stockholm, Sweden
  812.  
  813. ### You have the Easy Access virus. This virus may cause strange sounds.
  814. ### You have the 24-bit virus. This virus eats system memory like CRAZY.
  815.  
  816. +++++++++++++++++++++++++++
  817.  
  818. From: Ken Wieschhoff <kenw@ssd.kodak.com>
  819. Organization: Eastman Kodak Company
  820. Date: Thu, 23 Jul 92 14:51:52 GMT
  821.  
  822. A good way to keep users from running software from servers is to disable
  823. the capability completely.  When an application is started, doing a
  824. GetVol(  volumeName, &fVRefNum); when the app launches retrieves the
  825. volume reference.  Use the following routine to determine if a vol ref is
  826. a network volume.
  827.  
  828. pascal Boolean IsNetworkVolume( short vRefNum)
  829. {
  830.  
  831.     HParamBlockRec pb;
  832.     GetVolParmsInfoBuffer info;
  833.     OSErr err;
  834.  
  835.     // Flag mask for vMAttrib field
  836.     const long bExtFSVol = 1L << 16;
  837.     pb.ioParam.ioCompletion = NULL;
  838.     pb.ioParam.ioVRefNum = vRefNum;
  839.     pb.ioParam.ioNamePtr = NULL;
  840.     pb.ioParam.ioBuffer = (Ptr) & info;
  841.     pb.ioParam.ioReqCount = sizeof(GetVolParmsInfoBuffer);
  842.     
  843.     // Get volume info
  844.     err = PBHGetVolParmsSync( &pb);                
  845.  
  846.     // Check this for a network volume.
  847.     if ((info.vMServerAdr != 0) && (err == noErr))
  848.         return true;
  849.     else
  850.         return false;
  851. }
  852.  
  853.  
  854. Kenneth H. Wieschhoff, Jr.    | "If you want to f*** with 
  855. (716)426-3317(w)            | the Eagles, you gotta learn
  856. kenw@ssd.kodak.com            | to fly"  -->Heathers
  857.  
  858. +++++++++++++++++++++++++++
  859.  
  860. From: ewylie@ocf.berkeley.edu (Elizabeth Wylie)
  861. Date: 23 Jul 92 18:24:17 GMT
  862. Organization: U.C. Berkeley Open Computing Facility
  863.  
  864. - ---------
  865. A good way to keep users from running software from servers is to disable
  866. the capability completely.  When an application is started, doing a
  867. GetVol(  volumeName, &fVRefNum); when the app launches retrieves the
  868. volume reference.  Use the following routine to determine if a vol ref is
  869. a network volume.
  870. - ---------
  871.  
  872. To say the least it's a good way to piss off hundreds of your users.  Copy protection is a thing of the past.
  873.  
  874. OVERCHARGE !   OVERCHARGE !  OVERCHARGE !
  875.  
  876. E. Wylie
  877. .
  878.  
  879. +++++++++++++++++++++++++++
  880.  
  881. From: lari@bach.cs.unc.edu (Humayun Lari)
  882. Date: 23 Jul 92 19:18:28 GMT
  883. Organization: University of North Carolina, Chapel Hill
  884.  
  885. In article <D88-JWA.92Jul23100813@dront.nada.kth.se> d88-jwa@dront.nada.kth.se (Jon W{tte) writes:
  886. >.50.3> peter@cujo.curtin.edu.au (Peter N Lewis) writes:
  887. >   sake turn macsbug name generation off before you compile it!  I have seen
  888. >   several commercial apps with names turned on in their code checking code,
  889. >   pretty impressive guys :-)
  890. >
  891. >I see MacsBug symbols as a user service ! More than once have I had
  892. >spontaneous crashes, and only the debugger names helped me figure
  893. >out what was going on. Not to mention a dedicated user can provide
  894. >excellent feedback for Tech Support if the names still are in there,
  895. >like, fixing their bugs :-)
  896.  
  897. Oh, definitely. I was using a release version of a language that should have
  898. stayed in beta for a couple more months -- to be precise, it occasionally
  899. crashed as soon as you tried to run your program. One day, it decided to hang,
  900. and for some inexplicable reason :-) it had been some time since I'd saved.
  901. It was Macsbug time; the only problem was that there was no debugger switch
  902. on the Mac Plus -- it was a public lab, so naturally they didn't want users 
  903. accidentally bombing the machine. So <sigh> I stuck the strap of my wristwatch
  904. into the side of the Plus until it hit the switch, looked up the event loop
  905. in Macsbug, and typed something like "g event"...
  906.  
  907. Amazingly, it worked. :-)
  908.  
  909.  
  910. Humayun Lari
  911. (lari@cs.unc.edu)
  912.  
  913. +++++++++++++++++++++++++++
  914.  
  915. From: ewylie@ocf.berkeley.edu (Elizabeth Wylie)
  916. Date: 23 Jul 1992 21:36:21 GMT
  917. Organization: U.C. Berkeley Open Computing Facility
  918.  
  919. >I see MacsBug symbols as a user service ! More than once have I had
  920. >spontaneous crashes, and only the debugger names helped me figure
  921. >out what was going on. Not to mention a dedicated user can provide
  922. >excellent feedback for Tech Support if the names still are in there,
  923. >like, fixing their bugs :-)
  924.  
  925. I think the point the original poster was trying to make was it's much easier to berak copy protection schemes when there are macsbug labels like "CHECKPASSWORD", "COPY_PROTECTION_HERE", "BACKOFF_HACKERS" and "THIS_IS_IT".
  926.  
  927. On especially large projects you can save several K by not including macsbug names.  Keep 'em in your beta version, not in the final release.
  928.  
  929. (You *DO* write betas, don't you? And you *DO* have more than one person (your kid sister doesn't count) test for you?)
  930.  
  931. - -E Wylie
  932. .
  933.  
  934.  
  935. +++++++++++++++++++++++++++
  936.  
  937. From: d88-jwa@dront.nada.kth.se (Jon W{tte)
  938. Date: 23 Jul 92 22:28:29 GMT
  939. Organization: Royal Institute of Technology, Stockholm, Sweden
  940.  
  941. .kodak.com> Ken Wieschhoff <kenw@ssd.kodak.com> writes:
  942.  
  943.    A good way to keep users from running software from servers is to disable
  944.    the capability completely.  When an application is started, doing a
  945.    GetVol(  volumeName, &fVRefNum); when the app launches retrieves the
  946.    volume reference.  Use the following routine to determine if a vol ref is
  947.    a network volume.
  948.  
  949. Do you think users with System 7 file sharing would
  950. ever consider buying your program ?
  951.  
  952. PLAY BY THE RULES !
  953.  
  954. - -- 
  955.          Jon W{tte, Svartmangatan 18, S-111 29 Stockholm, Sweden
  956.  
  957. ### You have the Easy Access virus. This virus may cause strange sounds.
  958. ### You have the 24-bit virus. This virus eats system memory like CRAZY.
  959.  
  960. +++++++++++++++++++++++++++
  961.  
  962. From: kenw@ssd.kodak.com (Ken Wieschhoff)
  963. Date: 24 Jul 92 14:30:47 GMT
  964. Organization: Eastman Kodak Company
  965.  
  966. >Do you think users with System 7 file sharing would
  967. >ever consider buying your program ?
  968. >
  969. >PLAY BY THE RULES !
  970.  
  971. What rules?  Buy yer own goddamned copy!  If you're following 
  972. the thread, there's concern about placing a serial number 
  973. into the resource fork of the fuckin' file.  You don't want 
  974. to do that if you're on a network volume do you? 
  975.  
  976. Kenneth H. Wieschhoff, Jr.    | "If you want to f*** with 
  977. (716)426-3317(w)            | the Eagles, you gotta learn
  978. kenw@ssd.kodak.com            | to fly"  -->Heathers
  979.  
  980. +++++++++++++++++++++++++++
  981.  
  982. From: MacUserLabs@cup.portal.com (Stephan - Somogyi)
  983. Date: 24 Jul 92 19:35:00 GMT
  984. Organization: The Portal System (TM)
  985.  
  986. Ken Wieschhoff <kenw@ssd.kodak.com> writes:
  987.  
  988. >What rules? Buy yer own goddamned copy! If you're following the thread,
  989. >there's concern about placing a serial number into the resource fork of the
  990. >fuckin' file. You don't want to do that if you're on a network volume do
  991. >you?
  992.  
  993. Thank you for your well reasoned response to Jon's comment.
  994.  
  995. As I recall, your original posting stated that your software would refuse to
  996. launch from a remote volume since it checks whether or not it's on a local
  997. one.
  998.  
  999. I regularly put tools on a server where I can access them remotely as I
  1000. wander around the office carrying a floppy with an alias to the server. If I
  1001. encountered software that told me that it would not launch from a server,
  1002. even if I was the only launcher of said app and therefore well within my
  1003. rights as a single-user licensee, I would take a dim view of this indeed.
  1004.  
  1005. I will make sure we know to test this the next time we review certain kinds
  1006. of software. I can think of a number of instances where I'd want single-user
  1007. server access to some of the DTP tools we use around here. Not farfetched at
  1008. all.
  1009.  
  1010. As always, my opinions, not my employer's.
  1011.  
  1012. _________________________________________________________________________
  1013. Stephan Somogyi                  parking vulture                  MacUser
  1014.  
  1015. +++++++++++++++++++++++++++
  1016.  
  1017. From: d88-jwa@dront.nada.kth.se (Jon W{tte)
  1018. Date: 23 Jul 92 23:08:56 GMT
  1019. Organization: Royal Institute of Technology, Stockholm, Sweden
  1020.  
  1021. @ocf.berkeley.edu (Elizabeth Wylie) writes:
  1022.  
  1023.    On especially large projects you can save several K by not including macsbug names.  Keep 'em in your beta version, not in the final release.
  1024.  
  1025. But I'm not a beta tester. I still want to know what goes wrong
  1026. and how to fix it !
  1027.  
  1028.    (You *DO* write betas, don't you? And you *DO* have more than one person (your kid sister doesn't count) test for you?)
  1029.  
  1030. Yes of course. A few Ks don't matter much, and I like getting
  1031. mail from people who fix my bugs :-) I want others to feel the
  1032. same way since there STILL is bugs in released software.
  1033.  
  1034. - -- 
  1035.          Jon W{tte, Svartmangatan 18, S-111 29 Stockholm, Sweden
  1036.  
  1037. ### You have the Easy Access virus. This virus may cause strange sounds.
  1038. ### You have the 24-bit virus. This virus eats system memory like CRAZY.
  1039.  
  1040. +++++++++++++++++++++++++++
  1041.  
  1042. From: ewylie@ocf.berkeley.edu (Elizabeth Wylie)
  1043. Date: 24 Jul 92 01:21:20 GMT
  1044. Organization: U.C. Berkeley Open Computing Facility
  1045.  
  1046. In article <D88-JWA.92Jul24000856@dront.nada.kth.se> d88-jwa@dront.nada.kth.se (Jon W{tte) writes:
  1047.  
  1048. >But I'm not a beta tester. I still want to know what goes wrong
  1049. >and how to fix it !
  1050.  
  1051. A good point.  
  1052.  
  1053. >
  1054. >   (You *DO* write betas, don't you? And you *DO* have more than one person (your kid sister doesn't count) test for you?)
  1055.  
  1056. >Yes of course. A few Ks don't matter much, and I like getting
  1057. >mail from people who fix my bugs :-) I want others to feel the
  1058. >same way since there STILL is bugs in released software.
  1059.  
  1060. When writing INITs, etc.  I always make sure to keep the names off for the "final" release.  I'm really obsessive about system heap size.  Mine is 4 meg on an 8 meg machine.
  1061.  
  1062. It also gives me that "polishedd" feeling when I'm finally done with it.
  1063.  
  1064. - -E. Wylie
  1065. .
  1066.  
  1067. +++++++++++++++++++++++++++
  1068.  
  1069. From: peter@cujo.curtin.edu.au (Peter N Lewis)
  1070. Organization: NCRPDA, Curtin University
  1071. Date: Mon, 27 Jul 1992 09:02:36 GMT
  1072.  
  1073. In article <D88-JWA.92Jul23232829@dront.nada.kth.se>,
  1074. d88-jwa@dront.nada.kth.se (Jon W{tte) wrote:
  1075.  
  1076. >    A good way to keep users from running software from servers is to disable
  1077. >    the capability completely.  When an application is started, doing a
  1078. >    GetVol(  volumeName, &fVRefNum); when the app launches retrieves the
  1079. >    volume reference.  Use the following routine to determine if a vol ref is
  1080. >    a network volume.
  1081. > Do you think users with System 7 file sharing would
  1082. > ever consider buying your program ?
  1083.  
  1084. I hate to inject some actual technical information in here, especially when
  1085. you are refuting an argument that actually suggests programs should
  1086. disallow themselves to be run from a server (the stupidest thing I've heard
  1087. in a long while, practically every program we have hear we have a single
  1088. user license and a single copy on the server with the shared bit off so
  1089. only one user can use it at a time), BUT, even under System 7 with file
  1090. sharing turned on, the local volumes still have a 0 in the server address
  1091. field.  It's most annoying really - does anyone know how to get the
  1092. FileSharing port number for the local machine, the only way I've found to
  1093. do it is either an PConfirmName('=:AFPServer@*') to this machine (which I
  1094. think should actually fail because meta chars are not allowed in
  1095. PConfirmName, but seems to work anyway), or NBPLookup('=:AFPServer@*') and
  1096. then search thru for the local machine's net/node number.
  1097.  
  1098. Have fun all, and don't expect me to pay for (and hence use) any app I
  1099. can't use from my server - it'll go straight back for a refund.
  1100.    Peter.
  1101.  
  1102. _______________________________________________________________________
  1103. Peter N Lewis, NCRPDA, Curtin University       peter@cujo.curtin.edu.au
  1104. GPO Box U1987, Perth WA 6001, AUSTRALIA             FAX: +61 9 367 8141
  1105.  
  1106. +++++++++++++++++++++++++++
  1107.  
  1108. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  1109. Date: 29 Jul 92 04:50:19 GMT
  1110. Organization: University of Waikato, Hamilton, New Zealand
  1111.  
  1112. In article <62725@cup.portal.com>, MacUserLabs@cup.portal.com (Stephan - Somogyi) writes:
  1113. > I regularly put tools on a server where I can access them remotely as I
  1114. > wander around the office carrying a floppy with an alias to the server. If I
  1115. > encountered software that told me that it would not launch from a server,
  1116. > even if I was the only launcher of said app and therefore well within my
  1117. > rights as a single-user licensee, I would take a dim view of this indeed.
  1118.  
  1119. Here's another evil twist: a program that requires a serial number the
  1120. first time you run it after installation. Then, if you move it to a different
  1121. volume (like on a server), it asks for the serial number again!
  1122.  
  1123. I'm talking about Mathematica 2.0. I suspect it does something like store
  1124. a file or directory ID number in its prefs file. If this doesn't match, it
  1125. knows it's running a different copy.
  1126.  
  1127. > I will make sure we know to test this the next time we review certain kinds
  1128. > of software. I can think of a number of instances where I'd want single-user
  1129. > server access to some of the DTP tools we use around here. Not farfetched at
  1130. > all.
  1131.  
  1132. You might like to add Mathematica's copy protection to your list of things
  1133. to check.
  1134.  
  1135. "How do I piss the user off? Let me count the ways..."
  1136.  
  1137. ---------------------------
  1138.  
  1139. End of C.S.M.P. Digest
  1140. **********************
  1141.